using SqlSugar;
using System;

namespace ZhiKeDuoServer.Model
{
    /// <summary>
    /// 
    /// </summary>
    public class Cart : ModelContext
    {
        private System.Int32 _Id;
        /// <summary>
        /// 
        /// </summary>
        [SugarColumn(IsIdentity = true)]
        public System.Int32 Id { get { return this._Id; } set { this._Id = value; } }

        private System.Int32? _Sale_id;
        /// <summary>
        /// 
        /// </summary>
        public System.Int32? Sale_id { get { return this._Sale_id; } set { this._Sale_id = value ?? default(System.Int32); } }

        private System.String _Goodscode;
        /// <summary>
        /// 
        /// </summary>
        public System.String Goodscode { get { return this._Goodscode; } set { this._Goodscode = value?.Trim(); } }

        private System.Int32? _Counts;
        /// <summary>
        /// 
        /// </summary>
        public System.Int32? Counts { get { return this._Counts; } set { this._Counts = value ?? default(System.Int32); } }

        private System.Decimal? _Price;
        /// <summary>
        /// 
        /// </summary>
        public System.Decimal? Price { get { return this._Price; } set { this._Price = value ?? default(System.Decimal); } }

        private System.Decimal? _Pricehy;
        /// <summary>
        /// 
        /// </summary>
        public System.Decimal? Pricehy { get { return this._Pricehy; } set { this._Pricehy = value ?? default(System.Decimal); } }

        [SugarColumn(IsIgnore = true)]
        public string SaleID { get { return  base.CreateMapping<SaleInfo>().Single(it => it.Id == this.Sale_id).Pid; } }

       
    }
}